package com.liliudong.template.common.convert.sys;

import com.liliudong.template.common.dto.sys.SysUserAddOrUpdateDTO;
import com.liliudong.template.common.entity.sys.SysUser;
import com.liliudong.template.common.vo.sys.SysUserBaseVO;
import com.liliudong.template.common.vo.sys.SysUserDetailVO;
import com.liliudong.template.common.vo.sys.SysUserPageVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author ldli5
 * @classname UserMapper
 * @date 2024/6/18-17:02
 */
@Mapper
public interface SysUserConvert {

	SysUserConvert INSTANCE = Mappers.getMapper(SysUserConvert.class);

	/**
	 * 到系统用户
	 *
	 * @param sysUserAddOrUpdateDTO sys用户添加dto
	 * @return {@link SysUser }
	 */
	SysUser dto2Entity(SysUserAddOrUpdateDTO sysUserAddOrUpdateDTO);

	/**
	 * 到系统用户页面vo
	 *
	 * @param sysUsers sys用户
	 * @return {@link List }<{@link SysUserPageVO }>
	 */
	List<SysUserPageVO> entity2PageVo(List<SysUser> sysUsers);

	/**
	 * 实体2基本vo
	 *
	 * @param sysUsers sys用户
	 * @return {@link List }<{@link SysUserBaseVO }>
	 */
	SysUserBaseVO entity2BaseVo(SysUser sysUsers);

	/**
	 * 实体2细节vo
	 *
	 * @param sysUsers sys用户
	 * @return {@link SysUserDetailVO }
	 */
	SysUserDetailVO entity2DetailVo(SysUser sysUsers);
}
